//
//  Toast.m
//  FreezeFrame
//
//  Created by nick on 15/8/20.
//  Copyright (c) 2015年 www.trowsoft.com. All rights reserved.
//

#import "Toast.h"
#import "MBProgressHUD.h"

@implementation Toast


+(void) show:(NSString*)text withView:(UIView*)view withTime:(int)time{
    MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:view animated:YES];
    hud.mode = MBProgressHUDModeText;
    hud.labelText = text;
    hud.margin = 10.f;
    hud.yOffset = 150.f;
    hud.removeFromSuperViewOnHide = YES;
    [hud hide:YES afterDelay:time];
}

+(void) show:(NSString*)text withView:(UIView*)view{
    [Toast show:text withView:view withTime:2];
}

@end
